package org.jazz.basic;

import java.util.HashMap;
import java.util.Map;

public class ModelAndView {

	private Map<String, Object> dataMap;
	private String viewName;
	private boolean forward;
	
	public ModelAndView(String viewName) {
		this(viewName,true);
	}

	public ModelAndView(String viewName, boolean forward) {
		this.viewName = viewName;
		this.forward = forward;
		this.dataMap = new HashMap<String, Object>();
	}

	public Map<String, Object> getDataMap() {
		return dataMap;
	}

	public void addDataMap(String name, Object resultData) {
		this.dataMap.put(name, resultData);
	}

	public String getViewName() {
		return viewName;
	}

	public boolean isForward() {
		return forward;
	}
}
